home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / arch / um / include / shared / mem.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-12-24  |  455 b   |  23 lines

  1. /* 
  2.  * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  3.  * Licensed under the GPL
  4.  */
  5.  
  6. #ifndef __MEM_H__
  7. #define __MEM_H__
  8.  
  9. extern int phys_mapping(unsigned long phys, unsigned long long *offset_out);
  10.  
  11. extern unsigned long uml_physmem;
  12. static inline unsigned long to_phys(void *virt)
  13. {
  14.     return(((unsigned long) virt) - uml_physmem);
  15. }
  16.  
  17. static inline void *to_virt(unsigned long phys)
  18. {
  19.     return((void *) uml_physmem + phys);
  20. }
  21.  
  22. #endif
  23.